//
//  BaseNavigationViewController.m
//  魔兽大数据
//
//  Created by 王右 on 2017/10/24.
//  Copyright © 2017年 王右. All rights reserved.
//

#import "BaseNavigationViewController.h"
#import "BigDataHeader.h"



@interface BaseNavigationViewController ()

@end

@implementation BaseNavigationViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}


- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated{
    
    if (self.viewControllers.count > 0) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

- (UIViewController *)popViewControllerAnimated:(BOOL)animated{
    
    if (self.viewControllers.count == 2) {
        UIViewController *viewController = (UIViewController *)[self.viewControllers firstObject];
        viewController.hidesBottomBarWhenPushed = NO;
    }
    return [super popViewControllerAnimated:animated];
}

+(void)initialize {
    
    //导航栏设置
    [[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]]; //背景色
    [[UINavigationBar appearance] setTintColor:[UIColor colorWithHexString:@"#5c5c57"]];  //图标颜色
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
